spinlock: fix build with older GCC
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 19 May 2015 13:49:22 +0000 (15:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 19 May 2015 13:49:22 +0000 (15:49 +0200)
commit1037e33c88bb0e1fe530c164f242df17030102e1
tree0b47626bae9b502ee2b7cdf0d61cdcb5421bdca1
parentdb83975f0fcd30370392ed288a7bd2420624ed4e
spinlock: fix build with older GCC

Older GCC versions such as 4.3 cannot have initializers for the
members of anonymous structures, so initialize .head_tail instead.

Use a SPINLOCK_TICKET_INC define so this initializer is near the
spinlock_tickets_t definition (in case the structure changes requiring
changes to the initializer).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-and-tested-by: Jan Beulich <jbeulich@suse.com>
xen/common/spinlock.c
xen/include/xen/spinlock.h